<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/

// 注意！！！所有的路由都必须在v1 group内写，不允许写在外面

// v1路由（默认）, Controller路径为app/Controllers/v1, 命名空间 App\Controllers\v1
$router->group([
    'prefix' => 'v1',
    'namespace' => 'v1',
], function ($router) {

    $router->get('/site', 'SiteController@index');
    $router->post('/site/id/{id:\d+}', 'SiteController@id');

    /**
     * 我的账户
     */
    // 主钱包信息
    $router->get('/account/wallet', 'AccountController@getWallet');
    // 子钱包信息
    $router->get('/account/wallet/child', 'AccountController@getWalletPartner');
    // 子钱包列表
    $router->get('/account/partners', 'AccountController@getPartnerList');
    //回收子钱包
    $router->post('/account/wallet/recovery', 'AccountController@recoveryPartner');

    // 优惠列表
    $router->get('/account/coupon', 'AccountController@getCoupon');

    /**
     * 用户模块
     */
    // 登录
    $router->post('/user/login', 'UserController@login');
    // 免密登录
    $router->post('/user/loginbycode', 'UserController@loginByCode');
    // 注销
    $router->post('/user/logout', 'UserController@logout');
    // 注册
    $router->post('/user/register', 'UserController@register');
    // 获取注册字段
    $router->get('/user/register', 'UserController@getRegister');
    // 是否需要验证码
    $router->get('/user/needvcode', 'UserController@needVcode');
    // 获取验证码
    $router->get('/user/vcode', 'UserController@vcode');
    // 忘记密码（检验重置密码的用户名/手机/邮箱）
    $router->get('/user/resetpwd', 'UserController@getResetPwd');
    //我的账号
    $router->get('/user/account', 'UserController@getAccount');

    /**
     * 个人资料
     */
    // 获取个人资料
    $router->get('/profile/info', 'PropertyController@info');
    // 修改个人资料
    $router->post('/profile/info', 'PropertyController@modify');
    // 已绑定银行卡列表
    $router->get('/profile/banklist', 'PropertyController@bankList');
    // 银行列表
    $router->get('/profile/banks', 'PropertyController@banks');
    // 新增银行卡
    $router->post('/profile/bank', 'PropertyController@addBank');
    // 删除银行卡
    $router->delete('/profile/bank', 'PropertyController@delBank');

    /**
     * 消息模块
     */
    //最新消息列表
    $router->get('/msg/message/list', 'MessageController@getList');
    //修改消息状态
    $router->put('/msg/message/status', 'MessageController@changeStatus');
    //删除消息
    $router->delete('/msg/message', 'MessageController@delMessage');

    /*
     * 公告帮助模块
     */
    //公告列表
    $router->get('/notice/notice/game', 'HelpController@getList');
    //帮助文案
    $router->get('/help/bottom', 'HelpController@getBottom');
    //第三方客服
    $router->get('/help/service/3th', 'HelpController@get3third');
    //获取合作商图片,底部合作商
    $router->get('/help/collaborate', 'HelpController@getCollaborate');
    //h5个人中心菜单列表
    $router->get('/help/wallet/list', 'HelpController@getWalletList');

    /**
     * 首页模块
     */
    //获取网站已开通首页导航
    $router->get('/home/offlinerecord/hnavigation', 'HomeController@getHome');
    //获取首页浮动图
    $router->get('/home/float', 'HomeController@getFloat');
    //获取首页banner
    $router->get('/home/banner', 'HomeController@getBanner');
    //获取首页home
    $router->get('/home', 'HomeController@getMenu');
    //首页视讯
    $router->get('/home/live', 'HomeController@getLive');
    //首页顶部导航菜单
    $router->get('/home/menu', 'HomeController@getHomeMenu');
    //获取已读消息数
    $router->get('/home/message/read', 'HomeController@getMessageRead');
    //获取首页二维码
    $router->get('/home/qrcode', 'HomeController@getQrcode');
    //H5游戏大类列表
    $router->get('/home/menulist', 'HomeController@getHomeMenuList');
    //首页热门游戏
    $router->get('/home/hotgames', 'HomeController@getHotGame');
    //首页公告
    $router->get('/home/notice/h5list', 'HomeController@getNoticeList');
    //首页下载地址
    $router->get('/home/download', 'HomeController@getDownloadData');
    /**
     * 第三方游戏模块
     */
    //游戏登陆
    $router->post('/game/third/login', 'GameController@GameLogin');

    /**
     * 银行卡交易
     */
    //额度转化
    $router->post('/bank/user/exchange', 'BankController@transform');
    //获取提现优惠
    //跳转提款页面获取info数据
    $router->get('/bank/wallet/withdraw', 'BankController@getWithdraw');
    //线上提款-预申请页面
    $router->post('/bank/wallet/withdrawinfo', 'BankController@getWithdrawInfoDetail');
    //线上提款-确认页面
    $router->put('/bank/wallet/withdraw', 'BankController@getWithdrawConfirm');
    //存提记录
    $router->get('/bank/records/money', 'BankController@getUserMoneyList');




    //存款文案
    $router->get('/bank/help/list', 'BankController@getDepositHelp');

    //获取充值信息
    $router->get('/bank/wallet/recharge', 'BankController@getRecharge');
    //提交充值
    $router->put('/bank/wallet/recharge', 'BankController@putRecharge');

    /**
     * 账变记录
     */
    //投注记录分类
    $router->get('/order/menu', 'OrderController@orderMenu');
    //投注记录
    $router->get('/order/record/games', 'OrderController@recordGames');
    //往来记录分类
    $router->get('/order/record/menu', 'OrderController@recordMenu');
    //往来记录
    $router->get('/order/record/fromsearch', 'OrderController@recordFromsearch');
    //有效投注
    $router->get('/order/getEffectiveBetting', 'OrderController@getEffectiveBetting');

    /**
     * 安全中心模块
     */
    //安全信息
    $router->get('/safe/info', 'UserController@safetyInfo');
    //获取真实姓名
    $router->get('/safe/user/realname', 'UserController@getRealname');
    //实名认证（真是姓名、身份证号）
    $router->post('/safe/user/idcard', 'UserController@postIdcard');
    //登陆密码验证
    $router->post('/safe/user/password/valid', 'UserController@validPassword');
    //修改登陆密码
    $router->patch('/safe/user/password', 'UserController@patchPassword');
    //设置提款密码
    $router->put('/safe/user/withdrawpwd', 'UserController@putWithdrawPwd');
    //修改提款密码
    $router->patch('/safe/user/withdrawpwd', 'UserController@patchWithdrawPwd');
    //获取邮箱
    $router->get('/safe/user/email', 'UserController@getEmail');
    //发送邮箱验证码
    $router->post('/safe/user/email', 'UserController@postEmail');
    //设置邮箱
    $router->put('/safe/user/email', 'UserController@putEmail');
    //修改邮箱
    $router->patch('/safe/user/email', 'UserController@patchEmail');
    //验证邮箱验证码
    $router->patch('/safe/user/email/valid', 'UserController@validEmail');
    //获取谷歌验证数据
    $router->get('/safe/user/googleAuth', 'UserController@getGoogleAuth');
    //验证谷歌身份
    $router->post('/safe/user/googleAuth', 'UserController@postGoogleAuth');
    //获取手机号码
    $router->get('/safe/user/mobile', 'UserController@getMobile');
    //发送手机验证码
    $router->post('/safe/user/mobile', 'UserController@postMobile');
    //设置手机号码
    $router->put('/safe/user/mobile', 'UserController@putMobile');
    //修改手机号码
    $router->patch('/safe/user/mobile', 'UserController@patchMobile');
    //验证手机验证码
    $router->patch('/safe/user/mobile/valid', 'UserController@validMobile');

    /**
     * 优惠活动
     */
    //获取优惠类型列表信息
    $router->get('/active/types', 'ActiveController@getTypes');
    //获取优惠活动列表
    $router->get('/active/list', 'ActiveController@getActiveList');
    //活动详情
    $router->get('/active/detail', 'ActiveController@getActiveDetail');
    //申请参加活动
    $router->post('/active/list', 'ActiveController@postActive');

    /**
     * 免费试玩
     */
    //获取试玩账号
    $router->get('/demo/getuser', 'DemoController@getDemoUser');
    //试玩注册
    $router->post('/demo/register', 'DemoController@register');
});

// v2路由，Controller路径为app/Controllers/v2, 命名空间 App\Controllers\v2
$router->group([
    'prefix' => 'v2',
    'namespace' => 'v2',
], function ($router) {

});

